home *** CD-ROM | disk | FTP | other *** search
/ Programmer Plus 2007 / Programmer-Plus-2007.iso / Programming / Report Writers / Crystal Repot 9.0 Full CD version / Setup.exe / Windows / System32 / HTMLRE90.DLL / HTML / 11790 < prev    next >
Encoding:
Text File  |  2002-07-05  |  7.7 KB  |  317 lines

  1. <html>
  2.  
  3. <head>
  4. <LINK REL="stylesheet" TYPE="text/css" HREF="%7css/default.css">
  5. </head>
  6.  
  7. <SCRIPT LANGUAGE="JavaScript">
  8.  
  9. //LOCALIZATION STRINGS
  10. var _strConfirmContinue = "If you continue, the changes you have made will not be applied.  Do you wish to continue?";
  11.  
  12. function init()
  13. {
  14.     // Remove the formatting options
  15.     document.object_prop.targets.options[0] = null; 
  16.     document.object_prop.choices.options[0] = null; 
  17. }
  18.  
  19. function OnSubmit()
  20. {
  21.     modifyValues(); 
  22.     document.forms[0].submit(); 
  23. }
  24.  
  25. function OnCancel()
  26. {
  27.     window.parent.location = "%8" 
  28. }
  29.  
  30. function addTarget()
  31. {
  32.     // Run through this list twice, once to add, once to delete
  33.     total = document.object_prop.choices.options.length; 
  34.     for (count = 0; count < total; ++count)
  35.     {
  36.         current_target = document.object_prop.choices.options[count];
  37.             
  38.         if (current_target.selected)
  39.         {
  40.  
  41.             // remove the object from the current targets
  42.             target_name = current_target.text;
  43.             target_id   = current_target.value; 
  44.  
  45.             // Create a new option
  46.             option = new Option(target_name, target_id, false, false); 
  47.  
  48.             // add it to the possible targets
  49.             document.object_prop.targets.options[document.object_prop.targets.options.length] = option;
  50.         }
  51.     }
  52.  
  53.     for (count = document.object_prop.choices.options.length -1;  count >= 0; --count)
  54.     {
  55.         if (document.object_prop.choices.options[count].selected)
  56.             document.object_prop.choices.options[count] = null; 
  57.     }
  58. }
  59.  
  60. function addAllTargets()
  61. {
  62.     // Run through the options and remove all selections
  63.     total = document.object_prop.choices.options.length;
  64.     for (count = 0; count < total; ++count)
  65.     {
  66.         current_target = document.object_prop.choices.options[count];
  67.             
  68.         // remove the object from the current targets
  69.         target_name = current_target.text;
  70.         target_id   = current_target.value; 
  71.  
  72.         // Create a new option
  73.         option = new Option(target_name, target_id, false, false); 
  74.  
  75.         // add it to the possible targets
  76.         document.object_prop.targets.options[document.object_prop.targets.options.length] = option;
  77.     }
  78.  
  79.     // Remove old objects
  80.     document.object_prop.choices.options.length = 0; 
  81. }
  82.  
  83.  
  84.  
  85. function deleteTarget()
  86. {
  87.     
  88.     // Run through the options and remove the current selections
  89.     total = document.object_prop.targets.length;
  90.     for (count = 0; count < total; ++count)
  91.     {
  92.         current_target = document.object_prop.targets.options[count];    
  93.         if (current_target.selected)
  94.         {
  95.             // remove the object from the current targets
  96.             target_name = current_target.text;
  97.             target_id   = current_target.value; 
  98.         
  99.             // Create a new option
  100.             option = new Option(target_name, target_id, false, false); 
  101.  
  102.             // add it to the possible targets
  103.             document.object_prop.choices.options[document.object_prop.choices.options.length] = option;
  104.         }
  105.     }
  106.     for (count = total -1; count >= 0;  --count)
  107.     {
  108.         if (document.object_prop.targets.options[count].selected)
  109.         {
  110.             document.object_prop.targets.options[count] = null; 
  111.         }
  112.  
  113.     }
  114. }
  115.  
  116. function deleteAllTargets()
  117. {
  118.     // Run through the options and remove all of the selection
  119.     total = document.object_prop.targets.length;
  120.     for (count = 0; count < total; ++count)
  121.     {
  122.         current_target = document.object_prop.targets.options[count];
  123.             
  124.         // remove the object from the current targets
  125.         target_name = current_target.text;
  126.         target_id   = current_target.value; 
  127.  
  128.         // Create a new option
  129.         option = new Option(target_name, target_id, false, false); 
  130.  
  131.         // add it to the possible targets
  132.         document.object_prop.choices.options[document.object_prop.choices.options.length] = option
  133.     }
  134.     document.object_prop.targets.options.length = 0; 
  135. }
  136.  
  137. function modifyValues()
  138. {
  139.     final_value = ""; 
  140.     first = true; 
  141.  
  142.     for (count = 0; count < document.object_prop.targets.options.length; ++count)
  143.     {
  144.         if (!first)
  145.         {
  146.             final_value += "+"; 
  147.         }
  148.         else first = false; 
  149.  
  150.         current_target = document.object_prop.targets.options[count];    
  151.         final_value += current_target.value;
  152.  
  153.         // De-select all entries on the select box
  154.         current_target.selected = false;
  155.     }
  156.  
  157.     // Build the string
  158.     document.object_prop.selectedChoices.value = final_value;
  159. }
  160.  
  161. function doFilter()
  162. {
  163.   if (NoItemsSelectedOrDoNotCare())
  164.   {
  165.     url = "%10" + escape(document.object_prop.filter.value);
  166.     location.href = url;
  167.   }
  168. }
  169.  
  170. function doPrevious()
  171. {
  172.   if (NoItemsSelectedOrDoNotCare())
  173.   {
  174.     url = "%12";
  175.     location.href = url;
  176.   }
  177. }
  178.  
  179. function doNext()
  180. {
  181.   if (NoItemsSelectedOrDoNotCare())
  182.   {
  183.     url = "%13";
  184.     location.href = url;
  185.   }
  186. }
  187.  
  188. function NoItemsSelectedOrDoNotCare()
  189. {
  190.   if (document.object_prop.targets.options.length == 0)
  191.     return true;
  192.   else
  193.     return window.confirm (_strConfirmContinue)
  194. }
  195.  
  196. </SCRIPT>
  197.  
  198. <BODY onload="init();">
  199.  
  200. <FORM action="%3" target="_parent" method="post" name="object_prop" onSubmit="modifyValues()">
  201.  
  202. <CENTER>
  203.  
  204. <strong> %4 </strong>
  205.  
  206. </CENTER>
  207.  
  208. <BR>
  209. <BR>
  210.  
  211. <table>
  212.   <tr>
  213.     <td class="list" align> Look For: <input type="text" name="filter" value="%9" size=15> </td> 
  214.     <td align="left">
  215.     <table>
  216.       <tr>
  217.       <td><table cellpadding=0><tr>
  218.         <td class="clsButton" align=middle nowrap>
  219.            <div class="clsButton"> <A HREF="javascript:doFilter()">Find Now</A> </div>
  220.         </td></tr></table>
  221.       </td>
  222.       </tr>
  223.     </table>
  224.     </td>
  225.   </tr>
  226. </table>
  227.  
  228. <BR>
  229.  
  230. <center>
  231.  
  232. <table align=center CELLPADDING="0" CELLSPACING="2" border=0 width=100%>
  233.  
  234.   <tr> 
  235.     <td class="list" colspan=2 align=left>  %5 </td>
  236.     <td class="list" align=left> %6 </td> 
  237.   </tr>
  238.  
  239.   <tr>
  240.     <td class="list" align=left>
  241.         <SELECT class="menuFormElement" multiple NAME="choices" SIZE=10 width="200px">
  242.             <OPTION> This is a formatting string </OPTION>
  243.             %1
  244.         </SELECT>
  245.     </td>
  246.     
  247.     <td>
  248.         <table> 
  249.             <tr><td align=middle>
  250.                 <table align=center CELLPADDING="0" CELLSPACING="5" border=0> 
  251.                 <tr><td class="clsButton" align=middle nowrap> 
  252.                     <div class="clsButton"><a href="javascript:addTarget()">    >    </a></div>
  253.                 </td></tr>
  254.                 </table>
  255.             </td></tr>
  256.             <tr><td align=middle>
  257.                 <table align=center CELLPADDING="0" CELLSPACING="5" border=0> 
  258.                 <tr><td class="clsButton" align=middle nowrap> 
  259.                     <div class="clsButton"><a href="javascript:addAllTargets()">   >>   </a></div>
  260.                 </td></tr>
  261.                 </table>
  262.             </td></tr>
  263.             <tr><td align=middle>
  264.                 <table align=center CELLPADDING="0" CELLSPACING="5" border=0> 
  265.                 <tr><td class="clsButton" align=middle nowrap>     
  266.                     <div class="clsButton"><a href="javascript:deleteTarget()">    <    </a></div> 
  267.                 </td></tr>
  268.                 </table>
  269.             </td></tr>
  270.             <tr><td align=middle>
  271.                 <table align=center CELLPADDING="0" CELLSPACING="5" border=0> 
  272.                 <tr><td class="clsButton" align=middle nowrap>     
  273.                     <div class="clsButton"><a href="javascript:deleteAllTargets()">   <<   </a></div>
  274.                 </td></tr>
  275.                 </table>
  276.             </td></tr>
  277.         </table>
  278.     </td>
  279.     
  280.     <td class="list" align=left>
  281.         <SELECT class="menuFormElement" multiple NAME="targets" SIZE=10 width="200px">
  282.             <OPTION> This is a formatting string </OPTION>
  283.             %2
  284.         </SELECT>
  285.     </td>
  286.   </tr>
  287.  
  288.   <tr> 
  289.     <td> 
  290.         %11
  291.     </td> 
  292.   </tr>
  293.  
  294. </table>
  295.  
  296. <BR>
  297.  
  298. <table align=center  CELLSPACING="5" CELLPADDING="0" border=0> 
  299.     <tr>            
  300.         <td class="clsButton" align=middle nowrap> 
  301.             <div class="clsButton"><a href="javascript:OnSubmit()">OK</a></div>
  302.         </td>
  303.  
  304.         <td class="clsButton" align=middle nowrap> 
  305.             <div class="clsButton"><a href="javascript:OnCancel()">Cancel</a></div>
  306.         </td>
  307.     <tr>
  308. </table>
  309.  
  310. <input type=hidden name="selectedChoices" value = "">
  311.  
  312. </FORM>
  313.  
  314. </CENTER>
  315. </body>
  316. </html>
  317.